package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LhqCreateATemporaryMapper;
import com.ruoyi.system.domain.LhqCreateATemporary;
import com.ruoyi.system.service.ILhqCreateATemporaryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 创建临时课堂Service业务层处理
 * 
 * @author 林恒全
 * @date 2020-11-23
 */
@Service
public class LhqCreateATemporaryServiceImpl implements ILhqCreateATemporaryService 
{
    @Autowired
    private LhqCreateATemporaryMapper lhqCreateATemporaryMapper;

    /**
     * 查询创建临时课堂
     * 
     * @param id 创建临时课堂ID
     * @return 创建临时课堂
     */
    @Override
    public LhqCreateATemporary selectLhqCreateATemporaryById(Long id)
    {
        return lhqCreateATemporaryMapper.selectLhqCreateATemporaryById(id);
    }

    /**
     * 查询创建临时课堂列表
     * 
     * @param lhqCreateATemporary 创建临时课堂
     * @return 创建临时课堂
     */
    @Override
    public List<LhqCreateATemporary> selectLhqCreateATemporaryList(LhqCreateATemporary lhqCreateATemporary)
    {
        return lhqCreateATemporaryMapper.selectLhqCreateATemporaryList(lhqCreateATemporary);
    }

    /**
     * 新增创建临时课堂
     * 
     * @param lhqCreateATemporary 创建临时课堂
     * @return 结果
     */
    @Override
    public int insertLhqCreateATemporary(LhqCreateATemporary lhqCreateATemporary)
    {
        return lhqCreateATemporaryMapper.insertLhqCreateATemporary(lhqCreateATemporary);
    }

    /**
     * 修改创建临时课堂
     * 
     * @param lhqCreateATemporary 创建临时课堂
     * @return 结果
     */
    @Override
    public int updateLhqCreateATemporary(LhqCreateATemporary lhqCreateATemporary)
    {
        lhqCreateATemporary.setUpdateTime(DateUtils.getNowDate());
        return lhqCreateATemporaryMapper.updateLhqCreateATemporary(lhqCreateATemporary);
    }

    /**
     * 删除创建临时课堂对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLhqCreateATemporaryByIds(String ids)
    {
        return lhqCreateATemporaryMapper.deleteLhqCreateATemporaryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除创建临时课堂信息
     * 
     * @param id 创建临时课堂ID
     * @return 结果
     */
    @Override
    public int deleteLhqCreateATemporaryById(Long id)
    {
        return lhqCreateATemporaryMapper.deleteLhqCreateATemporaryById(id);
    }
}
